<template>
  <div class="bgf buyBox" >
    <div>
      <h4 style="margin:0">订单管理 </h4>
      <el-row>
        <el-col :span="20" >
          <div style="position:absolute;left:220px;z-index:2">
           <el-input placeholder="请输入内容" v-model="sheachValue" class="input-with-select" style="width:250px">
                  <el-button slot="append" @click="seachFun" icon="el-icon-search"></el-button>
            </el-input>
          </div>
        </el-col>
      </el-row>
      <el-tabs v-model="activeName" @tab-click="handleClick">
        <el-tab-pane label="未到店订单" name="first">
          <mybuy-list v-if="navStatus == -1" ref="children" :navStatus="navStatus" ></mybuy-list>
        </el-tab-pane>
        <el-tab-pane label="全部订单" name="second">
          <mybuy-list v-if="navStatus == 0" ref="children" :navStatus="navStatus"></mybuy-list>
        </el-tab-pane>
      </el-tabs>
    </div>
  </div>
</template>

<script>
  import Http from '@/Http/Http'
  import mybuyList from './mybuyList'
  export default {
    data() {
      var checkAge = (rule, value, callback) => {
        if (!value) {
          return callback(new Error('请输入关键字'));
        } else {
          callback();
        }
      };
      return {
        activeName: 'first',
        navStatus:-1,
        sheachValue:'',
      }
    },
    components:{
      mybuyList
    },
  
    methods: {
     
      handleClick(tab) {
        this.navStatus = Number(tab.index)-1;
      },
      goShop() {
        this.dialogVisible = true
      },
      handleClose() {
        this.dialogVisible = false;
      },
     
     
      seachFun(){
        this.$refs.children.getlist(this.sheachValue)
        console.log(2332)
      }
    }
  }
</script>
<style>
.buyBox{
  background: #fff;
  padding:10px;
  min-height: 500px
}
</style>

